import request from '../utils/request';
import {FT_URI} from "./base";

export function getDataList(data: any) {
  return request({
    url: `${FT_URI}/business/dataManager/getDataList`,
    method: 'post',
    data: data
  });
}
export function getManagerData() {
  return request({
    url: `${FT_URI}/business/dataManager/getDataTypeInfo`,
    method: 'get'
  });
}
export function addData(data: any) {
  return request({
    url: `${FT_URI}/business/dataManager/addData`,
    method: 'post',
    data: data
  });
}
export function updateData(data: any) {
  return request({
    url: `${FT_URI}/business/dataManager/updateData`,
    method: 'post',
    data: data
  });
}
export function deleteData(data: any) {
  return request({
    url: `${FT_URI}/business/dataManager/deleteData`,
    method: 'post',
    data: data
  });
}

export function importData(data: any) {
  return request({
    url: `${FT_URI}/business/dataManager/importData`,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  });
}

export function getImportDataTemplate(data: any) {
  return request({
    url: `${FT_URI}/business/dataManager/getImportDataTemplate`,
    method: 'post',
    data: data
  });
}